<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/common.jsp"%>
<!DOCTYPE html>
<html lang="zh">
<meta charset="utf-8">
<head></head>
<body class="gray-bg">
	<div class="container-div">
		<div>
			<div style="float: left;margin-right: 40%">
				<button onclick="window.history.go(-1)"><label style=" font-size: 20px ;font-weight: 300 "> 后退 </label></button>
			</div>
			<div style="float: left">
				<label style="color:royalblue; font-size: 20px ;font-weight: 300 "> 选择申报人 </label>
			</div>
		</div>
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								单位名称：
								<input type="text" name="txCompany" />
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()">
									<i class="fa fa-search"></i>
									&nbsp;搜索
								</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()">
									<i class="fa fa-refresh"></i>
									&nbsp;重置
								</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			<div class="btn-group-sm hidden-xs" id="toolbar" role="group"></div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
	<script>
		var prefix = "${ctx}/system/declaration";
	
		$(function() {
			var options = {
				url :   "${ctx}/system/registration/trlist",
				createUrl : "${ctx}/system/declaration/add?txId={id}",
				modalName : "申报登记",
				search : false,
				showExport : false,
				showColumns : false,
				showToggle : false,
				columns : [ {
					checkbox : true
				},
					{
						field : 'txId',
						title : '编号',
						visible : false
					},
					{
						field : 'txCompany',
						title : '单位名称',
					},
					{
						field : 'txOwner',
						title : '纳税人',
					},
					{
						field : 'txRegisteredCapital',
						title : '注册资金',
					},
					{
						field : 'txTotalInvestment',
						title : '投资总额',
					},
					{
						field : 'txPhone',
						title : '联系电话',
					},
					{
						field : 'status',
						title : '状态',
						formatter : function(value, row, index) {
							if (row.status == 1) {
								return "已创建";
							} else if (row.status == 2) {
								return "审核中";
							} else if (row.status == 3) {
								return "不通过";
							} else {
								return "审核通过";
							}
						}
					},
					{
						title : '操作',
						align : 'center',
						formatter : function(value, row, index) {
							var actions = [];
							if (row.status >= 4) {
								actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.add(\'' + row.txId + '\')"><i class="fa fa-play">录入信息</i></a>');
							}
							return actions.join('');
						}
					} ]
			};
			$.table.init(options);
		});

		function go(){
			window.location.href="${ctx}/system/declaration/list"
		}
	</script>
</body>
</html>